package com.aiyige.model.request;

import com.aiyige.base.api.ApiManager;

import java.util.List;

import okhttp3.ResponseBody;
import retrofit2.Call;

/**
 * Created by xiachao
 */

public class MyFavoriteSearchRequest {
    List<Integer> types;
    String time;
    Integer pageNum;
    Integer pageSize;
    String keyWord;

    private MyFavoriteSearchRequest(Builder builder) {
        time = builder.time;
        pageNum = builder.pageNum;
        pageSize = builder.pageSize;
        types = builder.types;
        keyWord = builder.keyWord;
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public static final class Builder {
        private String status;
        private String time;
        private Integer pageNum;
        private Integer pageSize;
        private List<Integer> types;
        private String keyWord;

        public Builder() {
            time = null;
            pageNum = 1;
            pageSize = 15;
            types = null;
            keyWord = null;
        }

        public Builder status(String status) {
            this.status = status;
            return this;
        }

        public Builder time(String time) {
            this.time = time;
            return this;
        }

        public Builder pageNum(Integer pageNum) {
            this.pageNum = pageNum;
            return this;
        }

        public Builder pageSize(Integer pageSize) {
            this.pageSize = pageSize;
            return this;
        }

        public Builder types(List<Integer> types) {
            this.types = types;
            return this;
        }

        public Builder keyWord(String keyWord) {
            this.keyWord = keyWord;
            return this;
        }


        public Call<ResponseBody> build() {
            return ApiManager.getService().myFavoriteAllType(new MyFavoriteSearchRequest(this));
        }
    }
}
